package risk.control.project.api;


import jakarta.servlet.http.HttpServletRequest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import risk.control.project.framework.PostController;
import risk.control.project.service.AuthCodeService;
import risk.control.project.service.BranchService;

import java.util.HashMap;


@RestController
@RequestMapping(value = "/main", produces = {"application/json;charset=UTF-8"})
public class MAIN_000_001_000 extends PostController {
    private static final Logger logger = LoggerFactory.getLogger(MAIN_000_001_000.class);

    private final AuthCodeService authCodeService;

    //文件上传下载前置接口，获取验证码
    public MAIN_000_001_000(AuthCodeService authCodeService) {
        this.authCodeService = authCodeService;
    }

    @PostMapping(value = "/000_001_000")
    public String doPost(HttpServletRequest request) {
        return handleRequest(request);
    }

    @Override
    protected String postRequest(HashMap<String, String> param) {
        return authCodeService.getAuthCode();
    }
}
